Dan Winship [Thu, 3 Mar 2011 20:14:52 +0000 (15:14 -0500)]
messageTray: dismiss notifications on click, not button-release-event
Notification was connecting to button-release-event to decide when to
be dismissed, which caused problems with widgets inside the
notification that reacted to button-press-event but not
button-release-event. Fix this by wrapping the Notification's table in
an StButton and connecting to 'click'.
Colin Walters [Thu, 10 Mar 2011 17:19:10 +0000 (12:19 -0500)]
Remove broken ShellAppSystem API and all consumers
In commit 9bd22dc0, I introduced an API to load an arbitrary
.desktop file, not necessarily from the menu path. It turns
out this function was broken because it created ShellApp instances
that were *different* from ones that were cached normally.
As far as I can tell, we didn't initially use it. Then later
Util.spawnDesktop was created which used this function.
Remove this broken function and all callers; if we're loading
.desktop files from *outside* the menu path, we can look at
readding.
This patch also kills off Util.spawnDesktop in favor of callers
talking to ShellAppSystem directly, now that the latter reports
errors.
Colin Walters [Tue, 15 Mar 2011 22:31:16 +0000 (18:31 -0400)]
Add shell_global_report_error()
Move the "system notification error" handling out of
util.js, and add it to ShellGlobal so we can start
calling it from across the codebase better (including
C).
Owen W. Taylor [Tue, 8 Mar 2011 03:09:41 +0000 (22:09 -0500)]
windowManager: fix up accounting of dimmed windows
Simplify the accounting of which windows we should dim by checking
the current state of windows rather than trying to track changes,
and by keeping a list of dimmed windows rather than a list of windows
with a dimmed parent. Remove windows from the list of dimmed windows
when they are destroyed.
This should fix problems where destroyed windows could end up in
the list of dimmed windows.
Dan Winship [Wed, 16 Mar 2011 13:40:25 +0000 (09:40 -0400)]
gnome-shell-jhbuild: Adjust GI_TYPELIB_PATH for NM inclusion
When jhbuilding, we use a jhbuilt gobject-introspection, so the
default typelib path is the jhbuild prefix, not /usr. So if we are
using NetworkManager from packages, we need to adjust GI_TYPELIB_PATH
to include it.
Adds an implementation of nm-applet in javascript. Uses the new
introspection from NetworkManager, and temporarily requires
nm-applet to be running for the secret service.
Features a renewed interface, with each device controllable through
a switch, which if toggled off disconnects, and if toggled on
connects to the most recently used valid connection. More esoteric
features like creation of ad-hoc networks have been moved to the
control center panel.
Inside the inner loop, use the inner iterator, not that of the outer
loop. At the same time, refactor the code to rely less on private
properties appended to foreign objects.
Ray Strode [Tue, 15 Mar 2011 19:19:58 +0000 (15:19 -0400)]
gdm: fix empty real name check
gdm_user_get_real_name() checks for an empty real
name and automatically falls back to username if
real name is NULL. It doesn't automatically fall
back to username if real name is empty, however.
Owen W. Taylor [Mon, 7 Mar 2011 20:31:55 +0000 (15:31 -0500)]
StContainer: Account for floating-point imprecision when sorting actors
When we compare the boxes for two actors, they may appear to overlap
by a small amount because of floating-point imprecision. Allow for
up to 0.1 pixel overlap when determining what children are in the
focus direction from the currently focused actor.
Dan Winship [Wed, 9 Mar 2011 13:58:27 +0000 (08:58 -0500)]
ShellWindowTracker: don't create ShellApps for non-interesting windows
If a process does not have any "interesting" windows, then it can't be
considered a running app. (Previously we were calling
get_app_for_window() before ruling out non-interesting windows, which
ended up calling _shell_app_new_for_window(), which would add the
window to the ShellApp directly, bypassing the is_interesting check.)
workspaceView: Make sure to scale the workspace proportionally
Commit 0207f1f29b776ae5f8f59321284f1adc2f85159e landed a new
way of zooming, but was causing all sorts of window positioning
weirdness because the positions were supposed to be working against
a proportional workspace.
Owen W. Taylor [Fri, 4 Mar 2011 20:54:19 +0000 (15:54 -0500)]
Use points for font sizes
Do a basic job of converting font sizes from pixels to points, so they
will scale will the global GNOME scale factor. Some other sizes that are
clearly related to the font sizes are changed to ems, but no comprehensive
attempt is made to get rid of px units.
Florian Müllner [Fri, 11 Mar 2011 23:37:43 +0000 (00:37 +0100)]
app-menu: Simplify startup animation
During application startup, we used to display a rotating spinner
which also moved from left to right, revealing the application title.
The result looks rather busy, so remove the horizontal movement.
This is another workaround for the lack of gjs supporting array
arguments, this time wrapping tp_connection_upgrade_contacts to
add new features to the connection's self contact.
Update the Source title when an contact's alias changes, and
also also add a minor meta message like the current timestamps.
Updating the alias of a 'presenced' contact will overwrite the
current title, and it will also not update the summary item title
right now due to limitations of the message tray.
Adel Gadllah [Sun, 13 Mar 2011 18:34:47 +0000 (19:34 +0100)]
XDND: Fix dragMonitor leak in WorkspacesDisplay
WorkspacesDisplay removes its dragMonitor in _dragEnd, but
this was never called in when a xdnd drag ended causing
dragMonitors to stack up and handling events multiple times.
Fix that by making sure that _dragEnd is called when xdnd ends.
Owen W. Taylor [Sun, 13 Mar 2011 00:41:23 +0000 (19:41 -0500)]
Work around Spidermonkey problem with Unicode date formats
Monkey-patch Date.prototype.toLocaleFormat() with a version that uses
g_date_time_format() since the Spidermonkey built-in can't handle
format strings with Unicode characters.
David Zeuthen [Mon, 14 Mar 2011 14:32:15 +0000 (10:32 -0400)]
clock: update every second
If we don't update every second, we may show the wrong time for up to
a minute on 1. resume; or 2. when changing the time; or 3. when
changing the timezone. This is both annoying and and leads to people
thinking that the tool for changing the time / timezone is broken.
- Don't use an icon for root
- For root, show Administrator in red
- Nuke icons for info and error messages
- Make error messages yellow
- Use 10pt size for error and message labels, not 12px
- Don't make the dialog change size when (single-line) error/info
messages appear
- Spacing fixes
- Show "Sorry, that didn't work. Please try again" if authentication fails
- Don't cancel the PolkitAgentSession if the session has already completed
Adel Gadllah [Sat, 12 Mar 2011 22:49:03 +0000 (23:49 +0100)]
popupMenu: Restyle the slider to use a color for the 'active' area
In the mockups the slider does not have an uniform color but uses
one color (shade of blue) to indicate the current value and one
to indicate "the rest" (shade of grey).
So adjust the slider to look like that to be closer to the look
in the mockups and thus to the design.
Owen W. Taylor [Sun, 13 Mar 2011 18:26:01 +0000 (14:26 -0400)]
Fix handling of clutter_init() failures
clutter_init() fails under normal circumstances like
being unable to open a display connection, so it shouldn't
be handled with g_error() producing a core dump.
Clutter consistently produces an error message when
clutter_init() fails, so we don't need to print out any
error message.
BluetoothStatus: don't pass NaNs to native functions
GJS complains when a NaN is passed in place of an integer, and
parseInt returns that from non numeric string. Pass a sentinel
that cancels the operation in that case.
Adel Gadllah [Sun, 13 Mar 2011 11:52:30 +0000 (12:52 +0100)]
StScrollViewFade: Fix GLSL shader to work on r300 hardware
The number instructions in a shader is limited to 64 on r300 hardware,
the fade shader in StScrollViewFade was ending up using 97 instructions
which is way over the limit.
So refactor the shader to use less instructions by precomputing as many
values as possible outside of the conditionals. The resulting shader
ends up using 34 instructions which is well within the hardware limits.
StTextureCache: generate icon names in the right order
GThemedIcon expects the first name to be the most specific, and
will thus prefer it to later ones. We thus need to order the names
from the longer to the shorter.
Status Menu: use Gnome Session DBus for shutdown and logout
Around 2.91.90, gnome-session-save was renamed to gnome-session-quit.
This commit restores compatibility with the older gnome-session, for
those testing under GNOME 2.32 or below, by calling the DBus methods
directly.
Owen W. Taylor [Wed, 9 Mar 2011 00:26:28 +0000 (19:26 -0500)]
viewSelector: allow programmatically switching to tabs
Add the idea of an 'id' for a tab, and add a public switchTab method
so you can switch to 'applications' or 'windows'. This will be useful
for performance tests that test tab switching performance.
To have more numbers to show how performance varies with different
numbers of windows and different types of windows (maximized,
with an alpha channel.)
Owen W. Taylor [Tue, 8 Mar 2011 23:48:07 +0000 (18:48 -0500)]
Use gnome-shell-perf-helper to control windows during perf tests
* Run gnome-shell-perf-helper during performance tests
* Use MUTTER_WM_CLASS_FILTER to omit all other windows
* Add new Scripting methods: createTestWindow,
waitTestWindows, destroyTestWindows
* Create a single 640x480 test window for testing overview
animation performance.
Owen W. Taylor [Tue, 8 Mar 2011 23:04:34 +0000 (18:04 -0500)]
gnome-shell-jhbuild: Fix race condition when launching DConf manually
We need to connect to the NameOwnerChanged signal before we execute the
DConf binary. Refactor things so that we connect to the signal when
we first get the bus object. Split the code for waiting for a D-Bus
name into a wait_for_dbus_name() function for latter reuse.
Owen W. Taylor [Fri, 11 Mar 2011 23:37:40 +0000 (18:37 -0500)]
Don't show the overview unless removing the workspace
Don't enter the overview at startup, or when we we remove the
last window on the first workspace, but only when we remove a
workspace and there are windows on the other workspaces.
Adel Gadllah [Wed, 9 Mar 2011 12:56:35 +0000 (13:56 +0100)]
telepathyClient: Pin the scrollbar to the bottom
When new messages come in we want to scroll down so that the user
sees the incoming messages. The current implementation does not work
because it relies on a synchronous allocation hack which does not work
for unmapped notifications.
Fix that by connecting to adjustment::changed and scroll whenever the
adjustment changes which equals "new messages", "new timestamp" or
"presense change", but don't interference with the user's scroll actions
i.e when the user scrolls back to read something don't scroll to the bottom.
Adel Gadllah [Wed, 9 Mar 2011 13:00:25 +0000 (14:00 +0100)]
notification: Remove scrollTo hack
Remove the hack from Notification.scrollTo because it is unreliable,
the caller should make sure to call scrollTo when it will actually
have the desired effect.